package simple.form.core;

import java.util.*;

/**
 * 验证消息
 * Created by Administrator on 2017/2/16.
 */
public class Message {
    /*表单验证结果状态，通过则true,默认是通过的*/
    private   boolean status = true;
    /*是否是通过Alert的方式验证表单，默认true*/
    private boolean isAlert =true;
    /*alert方式的消息内容*/
    private String  alertMessage;



    /*tips方式的消息内容,Map<"字段名称","提示内容">*/
    private Map<String,String> tipMessage;
    public Message() {
        this.tipMessage = new HashMap<>();
    }



    public Message(Map<String, String> tipMessage) {
        this.tipMessage = tipMessage;
    }



    public String getAlertMessage() {
        return alertMessage;
    }

    public void setAlertMessage(String alertMessage) {
        this.alertMessage = alertMessage;
    }


    public boolean getStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    public Map<String, String> getTipMessage() {
        return tipMessage;
    }

    public void setTipMessage(Map<String, String> tipMessage) {
        this.tipMessage = tipMessage;
    }

    public boolean isAlert() {
        return isAlert;
    }

    public void setIsAlert(boolean isAlert) {
        this.isAlert = isAlert;
    }

    @Override
    public String toString() {
        return "Message{" +
                "alertMessage='" + alertMessage + '\'' +
                ", status=" + status +
                ", isAlert=" + isAlert +
                ", tipMessage=" + tipMessage +
                '}';
    }

}
